package main

import (
	"dlib/dbus"
	"fmt"
	"os/exec"
)

type DateAndTime struct {
	DateChanged func()
	TimeChanged func()
}

const (
	_DATE_TIME_NAME = "com.deepin.daemon.DateAndTime"
	_DATE_TIME_PATH = "/com/deepin/daemon/DateAndTime"
	_DATE_TIME_IFC  = "com.deepin.daemon.DateAndTime"
)

func (dt *DateAndTime) GetDBusInfo() dbus.DBusInfo {
	return dbus.DBusInfo{
		_DATE_TIME_NAME,
		_DATE_TIME_PATH,
		_DATE_TIME_IFC,
	}
}

func (dt *DateAndTime) GetDiskList() {
	cmd := exec.Command("fdisk", "-l")
	out, err := cmd.Output()
	if err != nil {
		return
	}

	fmt.Println(out)
}

func main() {
	dt := DateAndTime{}
	bus, _ := dbus.SystemBus()
	select {}
}
